using System.Reflection;
using System.IO;

using Aspose.Words;

namespace AsposeTools
{
	/// <summary>
	/// Summary description for WordInterop.
	/// </summary>
	public class WordInterop
	{
		private static readonly License wordLicence;

		static WordInterop()
		{
			Stream stream = Assembly.GetAssembly(typeof(WordInterop)).GetManifestResourceStream(
				"AsposeTools.Aspose.Words.lic");
			wordLicence = new License();
			wordLicence.SetLicense(stream);
		}

		public static Document StartWordDocument(string dotFileName)
		{
			Document doc = null;
			try
			{
				doc = new Document(dotFileName);
			}
			catch
			{
			}
			return doc;
		}

		public static bool IsLicensed
		{
			get
			{
				return wordLicence is License;
			}
		}
	}
}
